<template>
  <div>
    <div class="info-card" :key="index" v-for="(item, index) in userInfoCard">
      <div class="user-bg">
        <img :src="item.bGimgUrl" alt="背景图片" />
      </div>
      <div class="head-portrait">
        <img :src="item.headPortrait" />
      </div>
      <div class="user-head">
        <div class="user-head-info">
          <div class="user-head-name">{{item.userName}}</div>
          <div class="user-head-present">{{item.userPresent}}</div>
          <div class="user-statistics" :key="index2" v-for="(item2, index2) in item.statistics">
            <span>{{item2.follow}}</span>关注<span>{{item2.fans}}</span>粉丝<span>{{item2.praise}}</span>获赞
          </div>
        </div>
        <div class="user-issue-like">
          <el-dropdown class="user-issue">
            <span class="el-dropdown-link user-blue">
              我的发布<i class="el-icon-caret-bottom el-icon--right"></i>
            </span>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item>pdf</el-dropdown-item>
              <el-dropdown-item>word</el-dropdown-item>
              <el-dropdown-item>b站视频</el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
          <el-dropdown class="user-like">
            <span class="el-dropdown-link">
              我的喜欢<i class="el-icon-caret-bottom el-icon--right"></i>
            </span>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item>pdf</el-dropdown-item>
              <el-dropdown-item>word</el-dropdown-item>
              <el-dropdown-item>b站视频</el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
    };
  },
  props: {
    userInfoCard: Array,
  }
};
</script>

<style lang="scss" scoped>
.info-card {
  position: relative;
  margin-right: 22px;
  width: 640px;
  // height: 408px;
  background: #fff;
  border-radius: 8px;
}
.head-portrait {
  position: absolute;
  top: 90px;
  overflow: hidden;
  margin-left: 16px;
  padding: 4px;
  width: 140px;
  height: 140px;
  border-radius: 70px;
  background: #fff;
}
.head-portrait > img {
  width: 100%;
  height: 100%;
}
.info-card:hover {
  box-shadow: 0 0 6px rgb(0 0 0 / 10%);
}
.user-bg {
  width: 100%;
  height: 160px;
}
.user-head-info {
  margin: 90px 20px 0;
}
.user-head-name {
  font-size: 20px;
}
.user-head-present {
  margin-top: 10px;
  font-size: 16px;
}
.user-statistics {
  margin-top: 22px;
  color: #a1a1a6;
}
.user-statistics > span {
  color: #000;
  font-size: 16px;
  margin-right: 4px;
}
.user-statistics > span + span {
  margin-left: 22px;
}

.user-issue-like {
  display: flex;
  padding: 44px 0 22px;
  justify-content: space-around;
}
.el-icon-caret-bottom {
  font-size: 16px;
  color: #409eff;
}
</style>
